<?php
class SingletonObject
{
    private static $instance;
    
    private function __construct() 
    {
    }

    public static function getInstance() 
    {
        if (!isset(self::$instance)) {
            $className = __CLASS__;
            self::$instancia = new $className;
        }
        return self::$instancia;
    }

    public function __clone()
    {
        trigger_error('No se permite la clonación.', E_USER_ERROR);
    }

    public function __wakeup()
    {
        trigger_error('No se permite deserializar.', E_USER_ERROR);
    }
}
?>